package com.deimos.tests;

import java.io.File;
import java.io.FileInputStream;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

import junit.framework.Test;
import junit.framework.TestSuite;

@RunWith(Suite.class)
@Suite.SuiteClasses( { 
    DescribeResultAccess.class,
    Confirm.class,
    Cancel.class,
    DescribeResultAccess.class,
    DescribeSensor.class,
    DescribeTasking.class,
    GetCapabilities.class,
    GetFeasibility.class,
    GetStatus.class,
    Reserve.class,
    Submit.class,
    Update.class,
    Validate.class,
    Scenarios.class
    })
public class AllTests {

    public static Test suite() {
	TestSuite suite = new TestSuite("Test for com.deimos.tests");
	return suite;
    }

    public static String readTest(String fileName) {
	String desc = "";
	int ch;
	StringBuffer strContent = new StringBuffer("");
	FileInputStream file = null;
	try {
	    file = new FileInputStream(fileName);
	    while ((ch = file.read()) != -1)
		strContent.append((char) ch);
	    file.close();
	    desc = strContent.toString();
	} catch (Exception e) {
	    try {
		file.close();
	    } catch (Exception ex) {
	    } // TODO Auto-generated catch block
	    e.printStackTrace();
	}
	return desc;
    }
    
    public static String test_dir = (new File(AllTests.class.getResource("AllTests.class").toString()).getParent() + "/../../../tests/").replace("file:", "");
}
